package top.txl.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.txl.Dto.WechatUserDO;

@Mapper
public interface LoginMapper {
    
    @Select("select id, token, nickname, avatar_url avatarUrl, gender, mobile, open_id from wechat_user where open_id in (#{openId})")
    WechatUserDO getUser(String openId);

    void saveUser(WechatUserDO user);

    @Select("select id from wechat_user where token=#{jwt}")
    Integer findUserByToken(String jwt);
}
